package entity

import "fmt"

const ProjectPre = "cloud_"

type entityType int

const (
	CacheTypeCategory = iota
	CacheTypeCloudPlan
	CacheTypeUser
)

func CacheKey(ty entityType, a ...any) string {
	var temp string
	switch ty {
	case CacheTypeCategory:
		temp = TableNameCloudPlan
	case CacheTypeCloudPlan:
		temp = TableNameCloudPlan
	case CacheTypeUser:
		temp = TableNameCloudUser
	default:
		temp = "NONE"
	}
	return fmt.Sprintf("%s/%0v", temp, a)
}

const (
	Flag              = "Flag"
	FlagIndex         = "ID"
	FlagClassify      = "Classify"
	FlagToken         = "Token"
	FlagStyle         = "Style"
	FlagParams        = "Params"
	FlagDetail        = "Detail"
	FlagRelate        = "Relate"
	FlagChildren      = "Children"
	FlagChildrenIndex = "ChildrenIndex"
)

const (
	OrderStateWait   = iota + 1
	OrderStateCancel = iota + 1
	OrderStateFinish = iota + 1
)
